<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  
  <title>统计 | 月迹的博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="月迹的博客，记录工作或生活中的学习历程，欢迎大家共同讨论！">
<meta name="keywords" content="yueji,月迹,博客,月迹的博客,大数据,Hadoop,HBase,学习,笔记">
<meta property="og:type" content="website">
<meta property="og:title" content="统计">
<meta property="og:url" content="https://xyueji.github.io/tags/index.html">
<meta property="og:site_name" content="月迹的博客">
<meta property="og:description" content="月迹的博客，记录工作或生活中的学习历程，欢迎大家共同讨论！">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2020-07-04T18:19:19.453Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="统计">
<meta name="twitter:description" content="月迹的博客，记录工作或生活中的学习历程，欢迎大家共同讨论！">
  
    <link rel="alternative" href="/atom.xml" title="月迹的博客" type="application/atom+xml">
  
  
    <link rel="icon" href="/img/favicon.png">
  
  
      <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css">
  
  <link rel="stylesheet" href="../css/style.css">
  <link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
  <link rel="apple-touch-icon" href="/apple-touch-icon.png">
  
  
      <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  
    
  <!-- 加载特效 -->
    <script src="/js/pace.js"></script>
    <link href="/css/pace/pace-theme-flash.css" rel="stylesheet">
  <script>
      var yiliaConfig = {
          rootUrl: '/',
          fancybox: true,
          animate: true,
          isHome: false,
          isPost: false,
          isArchive: false,
          isTag: false,
          isCategory: false,
          open_in_new: false
      }
  </script>
    <script src="https://cdn.bootcdn.net/ajax/libs/gitalk/1.6.2/gitalk.min.js"></script>
    <script>
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https') {
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else {
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
    </script>
</head>
</html>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
    <header id="header" class="inner">
        <a href="/" class="profilepic">
            
            <img lazy-src="/img/head.png" class="js-avatar">
            
        </a>

        <hgroup>
          <h1 class="header-author"><a href="/" title="Hi Mate">月 迹</a></h1>
        </hgroup>

        
        <p class="header-subtitle">用代码书写人生</p>
        
        
            <input type="text" class="search" id="search" style="text-align: center" placeholder="搜点什么...">
        
        
            <div id="switch-btn" class="switch-btn">
                <div class="icon">
                    <div class="icon-ctn">
                        <div class="icon-wrap icon-house" data-idx="0">
                            <div class="birdhouse"></div>
                            <div class="birdhouse_holes"></div>
                        </div>
                        <div class="icon-wrap icon-ribbon hide" data-idx="1">
                            <div class="ribbon"></div>
                        </div>
                        
                        <div class="icon-wrap icon-link hide" data-idx="2">
                            <div class="loopback_l"></div>
                            <div class="loopback_r"></div>
                        </div>
                        
                        
                        <div class="icon-wrap icon-me hide" data-idx="3">
                            <div class="user"></div>
                            <div class="shoulder"></div>
                        </div>
                        
                    </div>

                </div>
                <div class="tips-box hide">
                    <div class="tips-arrow"></div>
                    <ul class="tips-inner">
                        <li>菜单</li>
                        <li>标签</li>
                        
                        <li>友情链接</li>
                        
                        
                        <li>关于我</li>
                        
                    </ul>
                </div>
            </div>
        

        <div id="switch-area" class="switch-area">
            <div class="switch-wrap">
                <section class="switch-part switch-part1">
                    <nav class="header-menu">
                        <ul>
                        
                            <li><a href="../index.html">博客首页</a></li>
                        
                            <li><a href="../archives">文章归档</a></li>
                        
                            <li><a href="../tags">文章统计</a></li>
                        
                            <li><a href="../message">交友留言</a></li>
                        
                            <li><a href="../navigation">资源导航</a></li>
                        
                            <li><a href="../about">关于作者</a></li>
                        
                        </ul>
                    </nav>
                    <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fl mail" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=U2FhYmdrZGVjamITIiJ9MDw_" title="mail">mail</a>
                            
                                <a class="fl github" target="_blank" href="https://github.com/xyueji" title="github">github</a>
                            
                                <a class="fl rss" target="_blank" href="../atom.xml" title="rss">rss</a>
                            
                        </ul>
                    </nav>
                </section>

                
                <section class="switch-part switch-part2">
                    <div class="widget tagcloud" id="js-tagcloud">
                        <a href="AppendTrie树/" style="font-size: 10px;">AppendTrie树</a> <a href="HDFS/" style="font-size: 10px;">HDFS</a> <a href="JanusGraph/" style="font-size: 10px;">JanusGraph</a> <a href="SQL解析/" style="font-size: 10px;">SQL解析</a> <a href="SQL采集/" style="font-size: 10px;">SQL采集</a> <a href="alluxio/" style="font-size: 10px;">alluxio</a> <a href="bitmap/" style="font-size: 10px;">bitmap</a> <a href="container/" style="font-size: 10px;">container</a> <a href="datasource/" style="font-size: 10px;">datasource</a> <a href="docker/" style="font-size: 15px;">docker</a> <a href="docker-compose/" style="font-size: 15px;">docker-compose</a> <a href="flink/" style="font-size: 15px;">flink</a> <a href="free/" style="font-size: 10px;">free</a> <a href="git/" style="font-size: 10px;">git</a> <a href="grafana/" style="font-size: 10px;">grafana</a> <a href="hadoop/" style="font-size: 10px;">hadoop</a> <a href="hbase/" style="font-size: 15px;">hbase</a> <a href="hbck/" style="font-size: 10px;">hbck</a> <a href="hive/" style="font-size: 15px;">hive</a> <a href="idea/" style="font-size: 15px;">idea</a> <a href="impala/" style="font-size: 10px;">impala</a> <a href="iptables/" style="font-size: 10px;">iptables</a> <a href="mac/" style="font-size: 10px;">mac</a> <a href="mapreduce/" style="font-size: 10px;">mapreduce</a> <a href="metrics2/" style="font-size: 10px;">metrics2</a> <a href="opentsdb/" style="font-size: 10px;">opentsdb</a> <a href="phoenix/" style="font-size: 15px;">phoenix</a> <a href="presto/" style="font-size: 10px;">presto</a> <a href="prometheus/" style="font-size: 10px;">prometheus</a> <a href="pycharm/" style="font-size: 10px;">pycharm</a> <a href="salt-api/" style="font-size: 10px;">salt-api</a> <a href="shuffle/" style="font-size: 15px;">shuffle</a> <a href="spark/" style="font-size: 15px;">spark</a> <a href="springboot/" style="font-size: 10px;">springboot</a> <a href="top/" style="font-size: 10px;">top</a> <a href="vue/" style="font-size: 10px;">vue</a> <a href="wordcount/" style="font-size: 10px;">wordcount</a> <a href="修复工具/" style="font-size: 10px;">修复工具</a> <a href="元数据/" style="font-size: 10px;">元数据</a> <a href="分片/" style="font-size: 10px;">分片</a> <a href="基础知识/" style="font-size: 10px;">基础知识</a> <a href="大数据/" style="font-size: 20px;">大数据</a> <a href="大文件/" style="font-size: 10px;">大文件</a> <a href="大查询/" style="font-size: 10px;">大查询</a> <a href="安装/" style="font-size: 10px;">安装</a> <a href="小文件/" style="font-size: 10px;">小文件</a> <a href="开发规范/" style="font-size: 10px;">开发规范</a> <a href="数据倾斜/" style="font-size: 10px;">数据倾斜</a> <a href="数据血缘/" style="font-size: 10px;">数据血缘</a> <a href="测试/" style="font-size: 10px;">测试</a> <a href="热门商品/" style="font-size: 10px;">热门商品</a> <a href="端口/" style="font-size: 10px;">端口</a> <a href="端口映射/" style="font-size: 10px;">端口映射</a> <a href="精准去重/" style="font-size: 10px;">精准去重</a> <a href="系统表/" style="font-size: 10px;">系统表</a> <a href="表重建/" style="font-size: 10px;">表重建</a>
                    </div>
                </section>
                

                
                <section class="switch-part switch-part3">
                    <div id="js-friends">
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="https://dayesahh.github.io/">DaYesahh</a>
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://www.54tianzhisheng.cn/">zhisjeng</a>
                    
                    </div>
                </section>
                

                
                
                <section class="switch-part switch-part4">
                
                    <div id="js-aboutme">爱动漫、追小说、喜影视、迷于严谨和逻辑的编码之中！！！</div>
                </section>
                
            </div>
        </div>
    </header>
</div>

    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
      <div class="overlay">
          <div class="slider-trigger"></div>
          <h1 class="header-author js-mobile-header hide"><a href="/" title="Me">月 迹</a></h1>
      </div>
    <div class="intrude-less">
        <header id="header" class="inner">
            <a href="/" class="profilepic">
                
                    <img lazy-src="/img/head.png" class="js-avatar">
                
            </a>
            <hgroup>
              <h1 class="header-author"><a href="/" title="Me">月 迹</a></h1>
            </hgroup>
            
            <p class="header-subtitle">用代码书写人生</p>
            
            <nav class="header-menu">
                <ul>
                
                    <li><a href="../index.html">博客首页</a></li>
                
                    <li><a href="../archives">文章归档</a></li>
                
                    <li><a href="../tags">文章统计</a></li>
                
                    <li><a href="../message">交友留言</a></li>
                
                    <li><a href="../navigation">资源导航</a></li>
                
                    <li><a href="../about">关于作者</a></li>
                
                <div class="clearfix"></div>
                </ul>
            </nav>
            <nav class="header-nav">
                <div class="social">
                    
                        <a class="mail" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=U2FhYmdrZGVjamITIiJ9MDw_" title="mail">mail</a>
                    
                        <a class="github" target="_blank" href="https://github.com/xyueji" title="github">github</a>
                    
                        <a class="rss" target="_blank" href="../atom.xml" title="rss">rss</a>
                    
                </div>
            </nav>
        </header>                
    </div>
</nav>
      <div class="body-wrap"><article id="tags-" class="article article-type-tags" itemscope itemprop="blogPost">
    
    <div class="article-meta">
      <a href="" class="article-date">
      <time datetime="2019-01-03T13:35:22.000Z" itemprop="datePublished">2019-01-03</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      统计
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        

        
        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
          
              <style>
    .article-meta {
        display: none;
    }
    #container .article .article-title {
        padding-right: 0;
    }
    .article-header {
        padding: 0;
        padding-top: 26px;
        border-left: none;
        text-align: center;
    }
    .article-header:hover {
        border-left: none;
    }
    .article-title {
        font-size: 1.6em
    }
    .article-meta {
        display: none;
    }
    .article-entry hr {
        margin: 0;
    }
    #container .article-info-post.article-info {
      display: none;
      }
    #container .article .article-title {
    padding: 0;
    }
</style>


    <!-- Tag Cloud Page -->
    <hr>
    <br>
    <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="../categories/JanusGraph/">JanusGraph</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/SaltStack/">SaltStack</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/docker/">docker</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/flink/">flink</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/git/">git</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/hadoop/">hadoop</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/hbase/">hbase</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/impala/">impala</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/linux/">linux</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/phoenix/">phoenix</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/presto/">presto</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/prometheus/">prometheus</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/spark/">spark</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/元数据平台/">元数据平台</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/功能小记/">功能小记</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/工具/">工具</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="../categories/集群监控/">集群监控</a><span class="category-list-count">1</span></li></ul>

    <p class="count"></p>

    <div class="tags">
        <a href="AppendTrie树/" style="font-size: 16px; color: #808080">AppendTrie树</a> <a href="HDFS/" style="font-size: 16px; color: #808080">HDFS</a> <a href="JanusGraph/" style="font-size: 16px; color: #808080">JanusGraph</a> <a href="SQL解析/" style="font-size: 16px; color: #808080">SQL解析</a> <a href="SQL采集/" style="font-size: 16px; color: #808080">SQL采集</a> <a href="alluxio/" style="font-size: 16px; color: #808080">alluxio</a> <a href="bitmap/" style="font-size: 16px; color: #808080">bitmap</a> <a href="container/" style="font-size: 16px; color: #808080">container</a> <a href="datasource/" style="font-size: 16px; color: #808080">datasource</a> <a href="docker/" style="font-size: 25.5px; color: #404040">docker</a> <a href="docker-compose/" style="font-size: 25.5px; color: #404040">docker-compose</a> <a href="flink/" style="font-size: 25.5px; color: #404040">flink</a> <a href="free/" style="font-size: 16px; color: #808080">free</a> <a href="git/" style="font-size: 16px; color: #808080">git</a> <a href="grafana/" style="font-size: 16px; color: #808080">grafana</a> <a href="hadoop/" style="font-size: 16px; color: #808080">hadoop</a> <a href="hbase/" style="font-size: 25.5px; color: #404040">hbase</a> <a href="hbck/" style="font-size: 16px; color: #808080">hbck</a> <a href="hive/" style="font-size: 25.5px; color: #404040">hive</a> <a href="idea/" style="font-size: 25.5px; color: #404040">idea</a> <a href="impala/" style="font-size: 16px; color: #808080">impala</a> <a href="iptables/" style="font-size: 16px; color: #808080">iptables</a> <a href="mac/" style="font-size: 16px; color: #808080">mac</a> <a href="mapreduce/" style="font-size: 16px; color: #808080">mapreduce</a> <a href="metrics2/" style="font-size: 16px; color: #808080">metrics2</a> <a href="opentsdb/" style="font-size: 16px; color: #808080">opentsdb</a> <a href="phoenix/" style="font-size: 25.5px; color: #404040">phoenix</a> <a href="presto/" style="font-size: 16px; color: #808080">presto</a> <a href="prometheus/" style="font-size: 16px; color: #808080">prometheus</a> <a href="pycharm/" style="font-size: 16px; color: #808080">pycharm</a> <a href="salt-api/" style="font-size: 16px; color: #808080">salt-api</a> <a href="shuffle/" style="font-size: 25.5px; color: #404040">shuffle</a> <a href="spark/" style="font-size: 25.5px; color: #404040">spark</a> <a href="springboot/" style="font-size: 16px; color: #808080">springboot</a> <a href="top/" style="font-size: 16px; color: #808080">top</a> <a href="vue/" style="font-size: 16px; color: #808080">vue</a> <a href="wordcount/" style="font-size: 16px; color: #808080">wordcount</a> <a href="修复工具/" style="font-size: 16px; color: #808080">修复工具</a> <a href="元数据/" style="font-size: 16px; color: #808080">元数据</a> <a href="分片/" style="font-size: 16px; color: #808080">分片</a> <a href="基础知识/" style="font-size: 16px; color: #808080">基础知识</a> <a href="大数据/" style="font-size: 35px; color: #000">大数据</a> <a href="大文件/" style="font-size: 16px; color: #808080">大文件</a> <a href="大查询/" style="font-size: 16px; color: #808080">大查询</a> <a href="安装/" style="font-size: 16px; color: #808080">安装</a> <a href="小文件/" style="font-size: 16px; color: #808080">小文件</a> <a href="开发规范/" style="font-size: 16px; color: #808080">开发规范</a> <a href="数据倾斜/" style="font-size: 16px; color: #808080">数据倾斜</a> <a href="数据血缘/" style="font-size: 16px; color: #808080">数据血缘</a> <a href="测试/" style="font-size: 16px; color: #808080">测试</a> <a href="热门商品/" style="font-size: 16px; color: #808080">热门商品</a> <a href="端口/" style="font-size: 16px; color: #808080">端口</a> <a href="端口映射/" style="font-size: 16px; color: #808080">端口映射</a> <a href="精准去重/" style="font-size: 16px; color: #808080">精准去重</a> <a href="系统表/" style="font-size: 16px; color: #808080">系统表</a> <a href="表重建/" style="font-size: 16px; color: #808080">表重建</a>
    </div>
    <style>
        .category-list li{
            display: inline-block;
            margin: 0 1em .5em 0;
            padding: 4px;
            border: 1px solid lightgray;
            font-size: 1.2em;
        }
        .category-list a {
            color: gray;
        }
        .category-list-item:hover a {
            color: gray;
            text-decoration: none;
        }
        .category-list-count {
            margin-left: 2px;
            font-size: .9em;
        }
        .article-entry ul li:before{
            display: none;
        }
        .article-inner  {
            text-align: center;
        }
        .tags {
            max-width: 40em;
            margin: 2em auto;
            margin-top: 0em;
        }
        .tags a {
            margin-right: 1em;
            line-height: 65px;
            border-bottom: 1px solid gray;
            white-space: nowrap;
        }
        .tags a:hover {
            border-bottom: 2px solid black;
            text-decoration: none;
            font-style: italic;
        }
        #count > span {
            margin: auto .2em;
            font-weight: bold;
        }
    </style>

    <!-- Count tags and categories -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.6/require.js">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js">
    <p id="count">
            已有<span><script>document.write($(".category-list-item").length)</script></span>个分类，
            共计<span><script>document.write($(".tags > a").length)</script></span>个标签。
    </p>
    <script>
        $('#count').appendTo('.count');
    </script>



          
        
      
      
        <div class="page-reward">
          <p><a href="javascript:void(0)" onclick="dashangToggle()" class="dashang">赏</a></p>
          <div class="hide_box"></div>
          <div class="shang_box">
            <a class="shang_close" href="javascript:void(0)" onclick="dashangToggle()">×</a>
            <div class="shang_tit">
              <p>纯属好玩</p>
            </div>
            <div class="shang_payimg">
              <img src="/img/alipayimg.jpg" alt="扫码支持" title="扫一扫" />
            </div>
              <div class="pay_explain">扫码打赏，你说多少就多少</div>
            <div class="shang_payselect">
              
                <div class="pay_item checked" data-id="alipay">
                  <span class="radiobox"></span>
                  <span class="pay_logo"><img src="/img/alipay.png" alt="支付宝" /></span>
                </div>
              
              
                <div class="pay_item" data-id="wechat">
                  <span class="radiobox"></span>
                  <span class="pay_logo"><img src="/img/weixin.png" alt="微信" /></span>
                </div>
              
            </div>
            <div class="shang_info">
              <p>打开<span id="shang_pay_txt">支付宝</span>扫一扫，即可进行扫码打赏哦</p>
            </div>
          </div>
        </div>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
        <script type="text/javascript">
          $(".pay_item").click(function(){
            $(this).addClass('checked').siblings('.pay_item').removeClass('checked');
            var dataid=$(this).attr('data-id');
            $(".shang_payimg img").attr("src","/img/"+dataid+"img.jpg");
            $("#shang_pay_txt").text(dataid=="alipay"?"支付宝":"微信");
          });
          function dashangToggle(){

            $(".hide_box").fadeToggle();
            $(".shang_box").fadeToggle();
          }
        </script>
      
    </div>
    
  </div>
  
    



  
</article>



<div class="bdsharebuttonbox">
	<a href="#" class="fx fa-weibo bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
	<a href="#" class="fx fa-weixin bds_weixin" data-cmd="weixin" title="分享到微信"></a>
	<a href="#" class="fx fa-qq bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
	<a href="#" class="fx fa-facebook-official bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
	<a href="#" class="fx fa-twitter bds_twi" data-cmd="twi" title="分享到Twitter"></a>
	<a href="#" class="fx fa-linkedin bds_linkedin" data-cmd="linkedin" title="分享到linkedin"></a>
	<a href="#" class="fx fa-files-o bds_copy" data-cmd="copy" title="分享到复制网址"></a>
</div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>




    
        <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/gitalk/1.6.2/gitalk.min.css">
<div id="gitalk-container" class="gitment-container"></div>
<script type="text/javascript">
    var gitalk = new Gitalk({
        clientID: '8864436c2b03c3753a80',
        clientSecret: '252abc963e694743b034294b00a36ec6c7ee2152',
        id: 'tags/index.html',
        owner: 'xyueji',
        repo: 'xyueji.github.io',
        admin: 'xyueji',
        proxy: 'https://still-shadow-c49f.xyueji.workers.dev/?https://github.com/login/oauth/access_token'
    })
    gitalk.render('gitalk-container')
</script>

    






    <script>
        
    </script>
   <!-- 代码块复制功能-->
   <script src="/js/clipboard-use.js"></script>

</div>
      <footer id="footer">
    <div class="outer">
        <div id="footer-info">
            <div class="footer-left">
                &copy; 2022 月 迹
            </div>
            <div class="footer-right">
                <a href="http://hexo.io/" target="_blank" style="color: #000">Hexo</a>  Theme <a href="https://github.com/luuman/hexo-theme-spfk" target="_blank" style="color: #000">spfk</a> by luuman
            </div>
        </div>
        
            <div class="visit">
                
                    <span id="busuanzi_container_site_pv" style='display:none'>
                        <span id="site-visit" >本站到访数:
                            <span id="busuanzi_value_site_uv"></span>
                        </span>
                    </span>
                
                
                    <span>, </span>
                
                
                    <span id="busuanzi_container_page_pv" style='display:none'>
                        <span id="page-visit">本页阅读量:
                            <span id="busuanzi_value_page_pv"></span>
                        </span>
                    </span>
                
            </div>
        
    </div>
</footer>

    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.6/require.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js/main.js"></script>

    <!--<script>-->
        <!--$(document).ready(function() {-->
            <!--var backgroundnum = 0;-->
            <!--var backgroundimg = "url(/background/bg-" + backgroundnum +".jpg)";-->
            <!--$("#mobile-nav").css({"background-image": backgroundimg,"background-size": "cover","background-position": "center"});-->
            <!--$(".left-col").css({"background-image": backgroundimg,"background-size": "cover","background-position": "center"});-->
        <!--})-->
    <!--</script>-->



<!-- Google Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-168200248-1"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'UA-168200248-1');
</script>

<!-- End Google Analytics -->



<script>
	var _hmt = _hmt || [];
	(function() {
		var hm = document.createElement("script");
		hm.src = "https://hm.baidu.com/hm.js?1c0d5d76b7455fc584663ce315f75837";
		var s = document.getElementsByTagName("script")[0];
		s.parentNode.insertBefore(hm, s);
	})();
</script>



<div class="scroll" id="scroll">
    <a href="#"><i class="fa fa-arrow-up"></i></a>
    <a href="#comments"><i class="fa fa-comments-o"></i></a>
    <a href="#footer"><i class="fa fa-arrow-down"></i></a>
</div>
<script>
    $(document).ready(function() {
        if ($("#comments").length < 1) {
            $("#scroll > a:nth-child(2)").hide();
        };
    })
</script>


<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    
    <script language="javascript">
    $(function() {
        $("a[title]").each(function() {
            var a = $(this);
            var title = a.attr('title');
            if (title == undefined || title == "") return;
            a.data('title', title).removeAttr('title').hover(

            function() {
                var offset = a.offset();
                $("<div id=\"anchortitlecontainer\"></div>").appendTo($("body")).html(title).css({
                    top: offset.top - a.outerHeight() - 15,
                    left: offset.left + a.outerWidth()/2 + 1
                }).fadeIn(function() {
                    var pop = $(this);
                    setTimeout(function() {
                        pop.remove();
                    }, pop.text().length * 800);
                });
            }, function() {
                $("#anchortitlecontainer").remove();
            });
        });
    });
</script>
    
    
    
        <div class="search-result-list" ></div>
        <div class="search-cover"></div>
    <script type = "text/javascript" >
        $('#search').bind('keypress',function(event){
            if(event.keyCode == "13"){
                search()
            }
        });

    function search() {
        var searchTool = {
            data: [],
            arrList: [],
            oldList: [],
            init() {
                this.fetchJson()
            },
            fetchJson() {
                window.fetch('/content.json?t=' + (+new Date()), {
                    method: 'get',
                }).then((res) => {
                    return res.json()
                }).then((data) => {
                    this.data = data
                    let keywords = $('#search').val()
                    this.searchList(keywords)
                }).catch((err) => {
                    console.log(err)
                });
            },
            // 搜索字符串里面是否存在关键字
            isSreachIndexOF(oldstr, kw) {
                // console.log(oldstr, kw)
                var istrue = false
                // console.log('isSreachIndexOF', oldstr && toString.call(oldstr) === '[object Array]')
                if (oldstr && toString.call(oldstr) === '[object Array]') {
                    for (var i = 0; i < oldstr.length; i++) {
                        oldstr[i].toLowerCase() === kw.toLowerCase() ? istrue = true : null
                    }
                    return istrue
                }
                if (!oldstr || !kw) return false
                istrue = oldstr.toLowerCase().indexOf(kw.toLowerCase()) > -1
                return istrue
            },
            searchList(keywolds) {
                let divList = ''
                if (!keywolds) {
                    if (this.oldList.length) this.clear()
                } else {
                    this.data.forEach((item, index) => {
                        let tagsK = item.tags.map(item => item.name).join('-')
                        let categoriesK = item.categories.map(item => item.name).join('-')
                        if (this.isSreachIndexOF(item.title, keywolds) || this.isSreachIndexOF(tagsK, keywolds) || this.isSreachIndexOF(categoriesK, keywolds) || this.isSreachIndexOF(item.content, keywolds)) {
                            divList += `
                          <li>
                            <a href="/${item.path}" class="search-result-title">${item.title}</a>
                            <div class="main">
                              <div class="left">
                                <span>${item.author ? item.author : 'xyueji'}</span>
                                ${item.tags.map(tags => `<a href="/tags/${tags.slug}" class="search-result-tags">${tags.name}</a>`)}
                              </div>
                              <div class="right">${this.getFriendlyTime(item.date.replace('T', ' '), new Date())}</div>
                            </div>
                          </li>`
                        }
                    })
                    if (this.oldList.length) {
                        this.clear()
                    }
                    if (this.arrList.length) this.add()
                }
                if (!divList) {
                    divList = `<a class="search_close" href="javascript:void(0)" onclick="searchToggle()">×</a> <div style="text-align: center;font-size: 30px; margin-top: 50px;" ">抱歉，未搜索到相关结果</div>`
                } else {
                    divList = `<a class="search_close" href="javascript:void(0)" onclick="searchToggle()">×</a> <ul>` + divList + `</ul>`
                }
                $('.search-result-list').html(divList)
                $('.search-result-list').fadeToggle();
                $('.search-cover').fadeToggle();
            },
            clear() {
                this.oldList.forEach(item => {
                    $(".search-result-list li")[item].style.display = 'none'
                })
                this.oldList = []
            },
            add() {
                this.arrList.forEach(item => {
                    $(".search-result-list li")[item].style.display = 'block'
                })
                this.oldList = this.arrList
            },
            searchGo(keywolds) {
                this.arrList = []
                if (!keywolds) {
                    if (this.oldList.length) this.clear()
                } else {
                    this.data.forEach((item, index) => {
                        if (this.isSreachIndexOF(item.title, keywolds) || this.isSreachIndexOF(item.tags.map(item => item.name).join('-'), keywolds) || this.isSreachIndexOF(item.categories.map(item => item.name).join('-'), keywolds) || this.isSreachIndexOF(item.content, keywolds)) {
                            this.arrList.push(index)
                        }
                    })
                    if (this.oldList.length) this.clear()
                    if (this.arrList.length) this.add()
                }
            },
            /**
             * 获取指定时间的友好时间字符串。
             * @param str 指定的时间字符串，如yyyy-MM-dd HH:mm:ss
             * @param now 当前时间，允许时间戳，GMT时间，如果该参数为undefined，则使用浏览器时间。
             */
            getFriendlyTime(str, now) {
                var currentTime = new Date(now);
                var arr = str.split(/\s+/gi);
                var temp = 0, arr1, arr2, oldTime, delta;
                var getIntValue = function (ss, defaultValue) {
                    try {
                        return parseInt(ss, 10);
                    } catch (e) {
                        return defaultValue;
                    }
                };
                var getWidthString = function (num) {
                    return num < 10 ? ('0' + num) : num;
                };
                if (arr.length >= 2) {
                    arr1 = arr[0].split(/[\/\-]/gi);
                    arr2 = arr[1].split(':');
                    oldTime = new Date();
                    oldTime.setYear(getIntValue(arr1[0], currentTime.getFullYear()));
                    oldTime.setMonth(getIntValue(arr1[1], currentTime.getMonth() + 1) - 1);
                    oldTime.setDate(getIntValue(arr1[2], currentTime.getDate()));

                    oldTime.setHours(getIntValue(arr2[0], currentTime.getHours()));
                    oldTime.setMinutes(getIntValue(arr2[1], currentTime.getMinutes()));
                    oldTime.setSeconds(getIntValue(arr2[2], currentTime.getSeconds()));

                    delta = currentTime.getTime() - oldTime.getTime();

                    if (delta <= 60 * 1000) {
                        return '1分钟内';
                    } else if (delta < 60 * 60 * 1000) {
                        return Math.floor(delta / (60 * 1000)) + '分钟前';
                    } else if (delta < 24 * 60 * 60 * 1000) {
                        return Math.floor(delta / (60 * 60 * 1000)) + '小时前';
                    } else if (delta < 24 * 60 * 60 * 1000 * 30) {
                        return Math.floor(delta / (24 * 60 * 60 * 1000)) + '天前';
                    } else if (delta < 24 * 60 * 60 * 1000 * 30 * 12) {
                        return Math.floor(delta / (24 * 60 * 60 * 1000 * 30)) + '月前';
                    } else if (currentTime.getFullYear() != oldTime.getFullYear()) {
                        return [getWidthString(oldTime.getFullYear()), getWidthString(oldTime.getMonth() + 1), getWidthString(oldTime.getDate())].join('-')
                    } else {
                        return [getWidthString(oldTime.getMonth() + 1), getWidthString(oldTime.getDate())].join('-');
                    }
                }
                return '';
            }
        }
        searchTool.init()
    }
    function searchToggle() {
        $('.search-cover').fadeToggle();
        $('.search-result-list').fadeToggle();
    }
</script>


  </div>
</body>
</html>
